﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="ReportSchema"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://schemas.tanmiagrp.com/report-designer"
           elementFormDefault="qualified"
           xmlns="http://schemas.tanmiagrp.com/report-designer"
           xmlns:mstns="http://schemas.tanmiagrp.com/report-designer">
    <xs:simpleType name="Color">
        <xs:restriction base="xs:string">
            <xs:pattern value="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$" />
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="Thickness">
        <xs:restriction base="xs:string">
            <xs:pattern value="[0-9]+,[0-9]+,[0-9]+,[0-9]+" />
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="Visibility">
        <xs:restriction base="xs:string">
            <xs:pattern value="\{[A-Za-z]+\}|Visible|Hidden" />
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="ReportDesign">
        <xs:attribute name="Name"
                      type="xs:string"
                      use="required" />
        <xs:attribute name="PageSize"
                      type="xs:string"
                      use="required" />
        <xs:attribute name="PaperOrientation"
                      type="xs:string"
                      use="required" />
        <xs:attribute name="DesignUnit"
                      type="xs:string"
                      use="required" />
    </xs:complexType>

    <xs:element name="Report"
                type="ReportDesign" />
</xs:schema>
